From: Keir Fraser Date: Thu, 16 Jun 2011 15:57:22 +0000 (+0100) Subject: tasklets: Switch a few tasklets to run in softirq context. X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=2a46078cad635b1876a49309f1bb58cf142340e9;p=xen.git tasklets: Switch a few tasklets to run in softirq context. There are a couple of others which may also be safe. I've converted only the most obvious one. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 98b40f7a4f..b74a02aabb 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -992,9 +992,10 @@ int hvm_vcpu_initialise(struct vcpu *v) if ( rc != 0 ) goto fail5; - tasklet_init(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet, - (void(*)(unsigned long))hvm_assert_evtchn_irq, - (unsigned long)v); + softirq_tasklet_init( + &v->arch.hvm_vcpu.assert_evtchn_irq_tasklet, + (void(*)(unsigned long))hvm_assert_evtchn_irq, + (unsigned long)v); v->arch.user_regs.eflags = 2; diff --git a/xen/common/trace.c b/xen/common/trace.c index 41b7e3c407..6e5c1d8e4b 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -641,7 +641,8 @@ static void trace_notify_dom0(unsigned long unused) { send_guest_global_virq(dom0, VIRQ_TBUF); } -static DECLARE_TASKLET(trace_notify_dom0_tasklet, trace_notify_dom0, 0); +static DECLARE_SOFTIRQ_TASKLET(trace_notify_dom0_tasklet, + trace_notify_dom0, 0); /** * trace - Enters a trace tuple into the trace buffer for the current CPU. diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index c8cf8992df..8a4c6845b1 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -316,7 +316,8 @@ static void notify_dom0_con_ring(unsigned long unused) { send_guest_global_virq(dom0, VIRQ_CON_RING); } -static DECLARE_TASKLET(notify_dom0_con_ring_tasklet, notify_dom0_con_ring, 0); +static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet, + notify_dom0_con_ring, 0); static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count) { diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index aa7f07d844..ad08833d48 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -127,8 +127,9 @@ int pt_irq_create_bind_vtd( return -ENOMEM; } memset(hvm_irq_dpci, 0, sizeof(*hvm_irq_dpci)); - tasklet_init(&hvm_irq_dpci->dirq_tasklet, - hvm_dirq_assist, (unsigned long)d); + softirq_tasklet_init( + &hvm_irq_dpci->dirq_tasklet, + hvm_dirq_assist, (unsigned long)d); hvm_irq_dpci->mirq = xmalloc_array(struct hvm_mirq_dpci_mapping, d->nr_pirqs); hvm_irq_dpci->dirq_mask = xmalloc_array(unsigned long,